package com.woniuxy.woniuticket.moviemodule.dao;

import com.woniuxy.woniuticket.moviemodule.pojo.ScheduleMsg;
import com.woniuxy.woniuticket.pojo.CinemaMovies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

@Mapper
public interface CinemaMoviesDAO {
    int deleteByPrimaryKey(Integer id);

    int insert(CinemaMovies record);

    int insertSelective(CinemaMovies record);

    CinemaMovies selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CinemaMovies record);

    int updateByPrimaryKey(CinemaMovies record);

    //查询所有电影信息
    List<CinemaMovies> findAllMovies();

    @Select("select * from t_cinema_movies where movename=#{movename}")
    CinemaMovies selectByName(String movename);
    //限制查询所有电影信息
    List<CinemaMovies> findAllMoviesLimit(Integer index,Integer count);


    List<CinemaMovies> queryAllMovie(@Param("currentPage") Integer page,@Param("pageSize") Integer size);

    int delMovie(Integer[] moviesIds);

    int editMovie(CinemaMovies movies);
    //查询排片信息作为热点消息推送给用户
    List<CinemaMovies> querySchedule1(@Param("date1") Date date1, @Param("date2") Date date2);

    List<CinemaMovies> queryAllMovieByTime(String time);
}